package com.cans.lightning.business.pms.dao;

import com.cans.lightning.business.pms.entity.SysMenu;
import org.beetl.sql.mapper.BaseMapper;

import java.util.Date;

/**
 * 权限 - 菜单
 *
 * @author shencan
 * @date 2020/6/14 20:33
 */
public interface SysMenuDao extends BaseMapper<SysMenu> {
    default void insert(SysMenu SysMenu) {
        SysMenu.setCreateTime(new Date());
        this.getSQLManager().insert(SysMenu);
    }

    default int updateById(SysMenu SysMenu) {
        SysMenu.setLastChangeTime(new Date());
        return this.getSQLManager().updateById(SysMenu);
    }
}
